import upload from '@/utils/upload'
import request from '@/utils/request'

export function getChangXiaoListApi(query) {
  return request({
    url: '/xcjk/dm-task-long-report/page',
    method: 'get',
    params: query
  })
}

export function getDmTaskListApi(query) {
  return request({
    url: '/xcjk/dm-task/page',
    method: 'get',
    params: query
  })
}

export function reportChangXiaoApi(data) {
  return request({
    url: '/xcjk/dm-task-long-report/report',
    method: 'POST',
    data
  })
}

export function reportArtificialApi(data) {
  return request({
    url: '/xcjk/mp-task-artificial-report/report',
    method: 'POST',
    data
  })
}

export function getChangXiaoDetailApi(query) {
  return request({
    url: '/xcjk/dm-task-long-report/detail',
    method: 'get',
    params: query
  })
}
export function getArtificialDetailApi(query) {
  return request({
    url: '/xcjk/mp-task-artificial-report/detail',
    method: 'get',
    params: query
  })
}

export function getPatrolMobileFinishInfoTaskApi(query) {
  return request({
    url: '/xcjk/patrol-task/mobileFinishInfo',
    method: 'get',
    params: query
  })
}

export function getPatrolRecordListApi(query) {
  return request({
    url: '/xcjk/patrol-record/mobilePage',
    method: 'get',
    params: query
  })
}

export function getPatrolRecordDetailApi(query) {
  return request({
    url: '/xcjk/patrol-record/get',
    method: 'get',
    params: query
  })
}

export function createProjectCaseApi(data) {
  return request({
    url: '/xcjk/case-manage/create',
    method: 'POST',
    data
  })
}

export function getArtificialTaskListApi(query) {
  return request({
    url: '/xcjk/mp-task-artificial-report/page',
    method: 'get',
    params: query
  })
}

export function patrolTaskMobileReportApi(data) {
  return request({
    url: '/xcjk/patrol-task/mobileReportTask',
    method: 'PUT',
    data: data
  })
}
export function patrolTaskMobileReportPointApi(data) {
  return request({
    url: '/xcjk/patrol-task/mobileReportPoint',
    method: 'PUT',
    data: data
  })
}
export function updateCase(data) {
  return request({
    url: '/xcjk/case-manage/update',
    method: 'PUT',
    data: data
  })
}
export function startPatrolApi(data) {
  return request({
    url: '/xcjk/patrol-record/startPatrol',
    method: 'post',
    data: data
  })
}
export function endPatrolApi(data) {
  return request({
    url: '/xcjk/patrol-record/endPatrol',
    method: 'post',
    data: data
  })
}
export function updateConstruction(data) {
  return request({
    url: '/xcjk/case-manage/updateConstruction',
    method: 'post',
    data: data
  })
}

export function closeCase(data) {
  return request({
    url: '/xcjk/case-manage/closeCase',
    method: 'get',
    data: data
  })
}
export function affirmCase(data) {
  return request({
    url: '/xcjk/case-manage/affirm?caseId='+data,
    method: 'post',
    data: data
  })
}
